//
//  BoundSprite.h
//  StarBugs
//
//  Created by ?? ? on 12/28/11.
//  Copyright 2011 antisword@playorca.com. All rights reserved.
//
#ifndef __BOUND_SPRITE_H__
#define __BOUND_SPRITE_H__

#include "cocos2d.h"
#include "Box2D.h"

class BoundSprite : public cocos2d::CCNode
{
private:
    cocos2d::CCSize worldSize;
    cocos2d::CCSprite *sprite1;
    cocos2d::CCSprite *sprite2;
    
    cocos2d::CCArray *sprite1Arr;
    cocos2d::CCArray *sprite2Arr;
    
    cocos2d::CCSprite *rebirthSprite;
    cocos2d::CCArray *rebirthArray;
    
    int rebirthCnt;
    int cnt;
    bool isEnable;
public:
    ~BoundSprite();
    BoundSprite(cocos2d::CCSize _worldSize);
    void startAnimation(b2World *world);
    void pause();
    void resume();
    void tick(float dt);
    void setEnable();
    
    void startRebirthAni();
    void rebirthTick(float dt);
    cocos2d::CCSprite *mainSprite;
    b2Body *mainBody;
};

#endif//__BOUND_SPRITE_H__